<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>虚空商城</title>
    <style>
        body {
            margin: 0;
            padding: 20px;
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .header {
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            padding: 20px;
            text-align: center;
            color: white;
            position: relative;
        }

        .header h1 {
            margin: 0;
            font-size: 2.5em;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .user-info {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-top: 15px;
            font-size: 1.2em;
            font-weight: bold;
        }

        .money, .points {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 16px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
        }

        .shop-section {
            padding: 30px;
        }

        .shop-section h2 {
            color: #2c3e50;
            font-size: 1.8em;
            margin-bottom: 20px;
            text-align: center;
        }

        .items-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }

        .item-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: 2px solid transparent;
            position: relative;
            overflow: hidden;
        }

        .item-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        }

        .item-card.common {
            border-color: #95a5a6;
        }

        .item-card.uncommon {
            border-color: #27ae60;
        }

        .item-card.rare {
            border-color: #3498db;
        }

        .item-card.epic {
            border-color: #9b59b6;
        }

        .item-card.legendary {
            border-color: #f39c12;
            background: linear-gradient(45deg, #fff, #fff8e1);
        }

        .item-card.mythic {
            border-color: #e74c3c;
            background: linear-gradient(45deg, #fff, #ffe6e6);
        }

        .item-icon {
            font-size: 3em;
            margin-bottom: 10px;
        }

        .item-name {
            font-size: 1.3em;
            font-weight: bold;
            margin-bottom: 8px;
            color: #2c3e50;
        }

        .item-description {
            color: #7f8c8d;
            margin-bottom: 12px;
            font-size: 0.9em;
            line-height: 1.4;
            min-height: 40px;
        }

        .item-price {
            font-size: 1.2em;
            font-weight: bold;
            color: #f39c12;
            margin-bottom: 8px;
        }

        .item-stock {
            color: #27ae60;
            font-size: 0.9em;
            margin-bottom: 10px;
        }

        .item-stock.low {
            color: #e67e22;
        }

        .item-stock.out {
            color: #e74c3c;
        }

        .buy-button {
            background: linear-gradient(45deg, #3498db, #2980b9);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        .buy-button:hover {
            background: linear-gradient(45deg, #2980b9, #1f4e79);
            transform: scale(1.05);
        }

        .buy-button:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
            transform: none;
        }

        .shop-stats {
            background: linear-gradient(45deg, #74b9ff, #0984e3);
            color: white;
            padding: 20px;
            text-align: center;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-top: 15px;
        }

        .stat-item {
            background: rgba(255, 255, 255, 0.2);
            padding: 15px;
            border-radius: 10px;
            backdrop-filter: blur(10px);
        }

        .stat-value {
            font-size: 1.5em;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .stat-label {
            font-size: 0.9em;
            opacity: 0.9;
        }

        .footer {
            background: #2c3e50;
            color: white;
            text-align: center;
            padding: 15px;
            font-size: 0.9em;
        }

        .refresh-info {
            background: #f8f9fa;
            padding: 15px;
            text-align: center;
            border-top: 1px solid #dee2e6;
            color: #6c757d;
        }

        @media (max-width: 768px) {
            .container {
                margin: 10px;
                border-radius: 10px;
            }

            .header h1 {
                font-size: 2em;
            }

            .user-info {
                flex-direction: column;
                gap: 10px;
            }

            .items-grid {
                grid-template-columns: 1fr;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>🏪 虚空商城</h1>
            <div class="user-info">
<<<<<<< HEAD
                <div class="money">💰 金币: <%= money %></div>
                <div class="points">🏆 积分: <%= points %></div>
=======
                <div class="money">💰 金币: {{money}}</div>
                <div class="points">🏆 积分: {{points}}</div>
>>>>>>> 7028ad7f53a21aee76e66c12776e499a071a9b3b
            </div>
        </div>
        
        <div class="shop-section">
            <h2>📦 商品列表</h2>
            <div class="items-grid">
<<<<<<< HEAD
                <% for(var i = 0; i < items.length; i++) { %>
                <div class="item-card <%= items[i].rarity %>">
                    <div class="item-icon"><%= items[i].icon %></div>
                    <div class="item-name"><%= items[i].name %></div>
                    <div class="item-description"><%= items[i].description %></div>
                    <div class="item-price">💰 <%= items[i].price %> 金币</div>
                    <div class="item-stock <% if(items[i].stock === 0) { %>out<% } else if(items[i].stock < 5) { %>low<% } %>">
                        库存: <% if(items[i].stock === -1) { %>∞<% } else { %><%= items[i].stock %><% } %>
                    </div>
                    <button class="buy-button" <% if(items[i].stock === 0 || money < items[i].price) { %>disabled<% } %>>
                        <% if(items[i].stock === 0) { %>已售罄<% } else if(money < items[i].price) { %>金币不足<% } else { %>购买道具<%= items[i].id %><% } %>
                    </button>
                </div>
                <% } %>
=======
                {{#each items}}
                <div class="item-card {{rarity}}">
                    <div class="item-icon">{{icon}}</div>
                    <div class="item-name">{{name}}</div>
                    <div class="item-description">{{description}}</div>
                    <div class="item-price">💰 {{price}} 金币</div>
                    <div class="item-stock {{#if (eq stock 0)}}out{{else}}{{#if (lt stock 5)}}low{{/if}}{{/if}}">
                        库存: {{#if (eq stock -1)}}∞{{else}}{{stock}}{{/if}}
                    </div>
                    <button class="buy-button" {{#if (or (eq stock 0) (lt ../money price))}}disabled{{/if}}>
                        {{#if (eq stock 0)}}已售罄{{else}}{{#if (lt ../money price)}}金币不足{{else}}购买道具{{id}}{{/if}}{{/if}}
                    </button>
                </div>
                {{/each}}
>>>>>>> 7028ad7f53a21aee76e66c12776e499a071a9b3b
            </div>
        </div>

        <div class="shop-stats">
            <h3>📊 商城统计</h3>
            <div class="stats-grid">
                <div class="stat-item">
<<<<<<< HEAD
                    <div class="stat-value"><%= totalItems %></div>
                    <div class="stat-label">商品种类</div>
                </div>
                <div class="stat-item">
                    <div class="stat-value"><%= availableItems %></div>
                    <div class="stat-label">有库存商品</div>
                </div>
                <div class="stat-item">
                    <div class="stat-value"><%= todayRefresh %></div>
=======
                    <div class="stat-value">{{totalItems}}</div>
                    <div class="stat-label">商品种类</div>
                </div>
                <div class="stat-item">
                    <div class="stat-value">{{availableItems}}</div>
                    <div class="stat-label">有库存商品</div>
                </div>
                <div class="stat-item">
                    <div class="stat-value">{{todayRefresh}}</div>
>>>>>>> 7028ad7f53a21aee76e66c12776e499a071a9b3b
                    <div class="stat-label">今日刷新</div>
                </div>
            </div>
        </div>

        <div class="refresh-info">
            <p>💡 使用说明：#购买道具[ID] 购买商品 | #我的背包 查看背包 | #每日签到 获取金币</p>
            <p>🔄 商城每日自动刷新库存</p>
        </div>
        
        <div class="footer">
            <p>Create By trss-akasha-terminal-plugin</p>
        </div>
    </div>
</body>
</html>